{!empty $cats['sub_nav']:}
<div class="panel panel-default">
    <div class="list-group">
        {foreach $cats['sub_nav'] as $sub}
        <a href="{$sub.href}" class="list-group-item{if $sub['is_active']:} active{/if}" {$sub.target}>{$sub.title}</a>
        {/foreach}
    </div>
</div>
{/empty}

<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">搜索</h3>
    </div>
    <div class="panel-body">
        <form class="form-inline">
            <div class="form-group">
                <div class="input-group">
                    <input type="text" class="form-control" id="keyword" placeholder="请输入关键词..." />
                    <div class="input-group-addon" id="search" style="cursor:pointer;">
                        <i class="glyphicon glyphicon-search"></i>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">热门</h3>
    </div>
    <div class="panel-body">
        {php $hot=db('news')->cache(60)->field('id,title,read_count')->where('status=1')->order('read_count DESC')->limit(6)->select()}
        <ul class="list-unstyled">
            {foreach $hot as $k=>$v}
            {php $k=$k+1}
            <li><a href="{:url('news/detail',['id'=>$v['id']])}">{$k}. {$v.title}</a><span class="pull-right">{$v.read_count}</span></li>
            {/foreach}
        </ul>
    </div>
</div>

<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">标签</h3>
    </div>
    <div class="panel-body">
        {php $tags=widget('common.tags')->get()}
        {foreach $tags as $sign=>$name}
        <a href="{:url('news/index', ['tag'=>$sign])}">#{$name}</a>&nbsp;&nbsp;
        {/foreach}
    </div>
</div>
